package com.cskaoyan.service;

import com.cskaoyan.bean.MarketRole;
import com.cskaoyan.bean.MarketRoleExample;
import com.cskaoyan.mapper.MarketRoleMapper;
import com.cskaoyan.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSessionFactory;

import java.util.List;

/**
 * @Author：LiuFan
 * @Project：Java50th_first
 * @Package：com.cskaoyan.service
 * @Date：2023/5/31 10:30
 */
public class AdminRoleServiceImpl implements AdminRoleService{
    SqlSessionFactory sqlSessionFactory = MyBatisUtil.getSqlSessionFactory();
    @Override
    public List<MarketRole> options() {
        MarketRoleMapper roleMapper = sqlSessionFactory.openSession().getMapper(MarketRoleMapper.class);

        MarketRoleExample example = new MarketRoleExample();
        example.or().andDeletedEqualTo(false);
        return roleMapper.selectByExample(example);
    }
}
